<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%String path = request.getContextPath();%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<div class="crumb-wrap">
    <div class="crumb-list"><i class="icon-font"></i><a href="index.html">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">资讯列表</span><span class="crumb-step">&gt;</span><span class="crumb-name">资讯管理<span style="color: red"><span id="count"></span></span></span></div>
</div>
<div class="search-wrap">
    <div class="search-content">
    </div>
</div>
<div class="result-title">
    <div style="margin-left: 50px" class="result-list">
        <a href="<%=path%>/manage/news/newsInsert"><i  class="icon-font"></i>新增文章</a>
    </div>
</div>
<table class="result-tab" width="100%">
    <tr>
        <th class="tc" width="5%"><input class="allChoose" name="" type="checkbox">排序</th>
        <th>标题</th>
        <th>来源</th>
        <th>点赞数</th>
        <th>发布时间</th>
        <th>操作</th>
    </tr>
    <c:forEach items="${requestScope.newsPageInfo.list}" var="news" varStatus="stat">
        <tr id="tr${news.id}">
            <td class="tc"><input name="id[]" value="59" type="checkbox">${stat.index+1}</td>
            <td data-id="${news.id}" class="new" style="color: #4b7eff">《${news.title}》</td>
            <td>
               <c:if test="${empty news.userinfo.id}">
                   管理员账户：${news.admin.account}
               </c:if>
                <c:if test="${not empty news.userinfo.id}">
                ${news.userinfo.name}
                </c:if>
            </td>
            <td>${news.likeCount}</td>
            <td><fmt:formatDate value="${news.inputTime}" pattern="yyyy-MM-dd"/></td>
            <td>
                <a class="link-del" data-id="${news.id}">删除</a>
                <a class="" href="<%=path%>/manage/news/update?id=${news.id}">修改</a>
            </td>
        </tr>
    </c:forEach>
</table>
<div class="list-page">
    <c:forEach  items="${requestScope.newsPageInfo.navigatepageNums}" var="i">
        <a class="list"  data-id="${i}">${i}</a>
    </c:forEach>
</div>
